import type { GetCodeData, GetCodeParams, LoginCodeData, LoginCodeParams } from '@/types/user'
import { request } from '@/utils/request'

export const getCodeApi = (params: GetCodeParams) => {
  return request.get<null, GetCodeData>('/code', { params })
}

export const loginByMobileApi = (data: LoginCodeParams) => {
  return request.post<LoginCodeParams, LoginCodeData>('/login', data)
}
